#ifndef MATERIAL_H_
#define MATERIAL_H_

#include <string>
#include <vector>
#include "texture/TextureReference.h"
#include "art/RGBA.h"
#include "art/ShaderProgram.h"

class Material {
	std::string name;
	float ambient;
	RGBA diffuse;
	RGBA specular;
	float emmisive;
	float shininess;
	std::vector<TextureReference*> texrefs;
	ShaderProgram *shaderProgram;

public:
	Material();
	void use();
	virtual ~Material();
	ShaderProgram *getShaderProgram() const {
		return shaderProgram;
	}

	void setShaderProgram(ShaderProgram *shaderProgram) {
		this->shaderProgram = shaderProgram;
	}

	float getAmbient() const {
		return ambient;
	}

	RGBA getDiffuse() const {
		return diffuse;
	}

	float getEmmisive() const {
		return emmisive;
	}

	std::string getName() const {
		return name;
	}

	float getShininess() const {
		return shininess;
	}

	RGBA getSpecular() const {
		return specular;
	}

	std::vector<TextureReference*> & getTexrefs() const {
		return (std::vector<TextureReference*>&) (texrefs);
	}

	void setAmbient(float ambient) {
		this->ambient = ambient;
	}

	void setDiffuse(RGBA diffuse) {
		this->diffuse = diffuse;
	}

	void setEmmisive(float emmisive) {
		this->emmisive = emmisive;
	}

	void setName(std::string name) {
		this->name = name;
	}

	void setShininess(float shininess) {
		this->shininess = shininess;
	}

	void setSpecular(RGBA specular) {
		this->specular = specular;
	}

	void setTexrefs(std::vector<TextureReference*> textures) {
		this->texrefs = textures;
	}

};

#endif /* MATERIAL_H_ */
